Skip to content

fix: correct loc.start for classconstant and propertystatement with attributes#1225

Merged
czosel merged 2 commits into
mainfrom
fix/attr-group-loc-start-class-members
May 17, 2026
Merged

fix: correct loc.start for classconstant and propertystatement with attributes#1225
czosel merged 2 commits into
mainfrom
fix/attr-group-loc-start-class-members

Conversation

@jorgsowa
Copy link
Copy Markdown
Collaborator

Fixes prettier/plugin-php#2436

The issue was with the wrong location of attributes.

@czosel
Copy link
Copy Markdown
Collaborator

czosel commented Mar 25, 2026

This has been fixed in a previous PR, right? Can you link to it, for future reference?

@jorgsowa jorgsowa force-pushed the fix/attr-group-loc-start-class-members branch from 6cd52a1 to 08df352 Compare March 25, 2026 20:54
@jorgsowa
Copy link
Copy Markdown
Collaborator Author

Not really. I messed up something in this PR and didn't include the fix. I will change to draft and fix later. Too many PRs were opened from my side.

@jorgsowa jorgsowa marked this pull request as draft March 25, 2026 20:55
@czosel
Copy link
Copy Markdown
Collaborator

czosel commented Mar 25, 2026

No worries, your work is much appreciated! 👍

@jorgsowa jorgsowa force-pushed the fix/attr-group-loc-start-class-members branch from b586fef to 3b6070d Compare March 30, 2026 10:19
@jorgsowa jorgsowa force-pushed the fix/attr-group-loc-start-class-members branch from 3b6070d to 10678ec Compare March 30, 2026 10:33
@jorgsowa
Copy link
Copy Markdown
Collaborator Author

I didn't push all changes from my branch. Now it's ultimately fixed. Accessibility keywords were not properly assigned, and the locations were wrong for constants.

@jorgsowa jorgsowa marked this pull request as ready for review March 30, 2026 10:51
Copy link
Copy Markdown
Collaborator

@czosel czosel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@czosel czosel merged commit e85385c into main May 17, 2026
6 checks passed
@czosel czosel deleted the fix/attr-group-loc-start-class-members branch May 17, 2026 20:15
@czosel
Copy link
Copy Markdown
Collaborator

czosel commented May 17, 2026

Released in v3.6.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Class attribute gets duplicated on another class property

2 participants